<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // findIndex()方法返回数组中满足提供的测试函数的第一个元素的索引。否则返回-1。
    var arr = [10, 20, 52, 59]
    var index = arr.findIndex(item => item > 15)
    console.log(index);  // 1
  </script>
</body>

</html>